<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QtWebApp: stefanfrings::HttpConnectionHandlerPool Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">QtWebApp
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classstefanfrings_1_1HttpConnectionHandlerPool.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classstefanfrings_1_1HttpConnectionHandlerPool-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">stefanfrings::HttpConnectionHandlerPool Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Pool of http connection handlers.  
 <a href="classstefanfrings_1_1HttpConnectionHandlerPool.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="httpconnectionhandlerpool_8h_source.html">httpconnectionhandlerpool.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for stefanfrings::HttpConnectionHandlerPool:</div>
<div class="dyncontent">
<div class="center"><img src="classstefanfrings_1_1HttpConnectionHandlerPool__inherit__graph.png" border="0" usemap="#astefanfrings_1_1HttpConnectionHandlerPool_inherit__map" alt="Inheritance graph"/></div>
<map name="astefanfrings_1_1HttpConnectionHandlerPool_inherit__map" id="astefanfrings_1_1HttpConnectionHandlerPool_inherit__map">
<area shape="rect" title="Pool of http connection handlers." alt="" coords="5,80,215,121"/>
<area shape="rect" title=" " alt="" coords="73,5,147,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for stefanfrings::HttpConnectionHandlerPool:</div>
<div class="dyncontent">
<div class="center"><img src="classstefanfrings_1_1HttpConnectionHandlerPool__coll__graph.png" border="0" usemap="#astefanfrings_1_1HttpConnectionHandlerPool_coll__map" alt="Collaboration graph"/></div>
<map name="astefanfrings_1_1HttpConnectionHandlerPool_coll__map" id="astefanfrings_1_1HttpConnectionHandlerPool_coll__map">
<area shape="rect" title="Pool of http connection handlers." alt="" coords="5,80,215,121"/>
<area shape="rect" title=" " alt="" coords="73,5,147,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8ce1d865b1efd7495b5ce55f5d12a3ab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandlerPool.html#a8ce1d865b1efd7495b5ce55f5d12a3ab">HttpConnectionHandlerPool</a> (const QSettings *settings, <a class="el" href="classstefanfrings_1_1HttpRequestHandler.html">HttpRequestHandler</a> *requestHandler)</td></tr>
<tr class="memdesc:a8ce1d865b1efd7495b5ce55f5d12a3ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classstefanfrings_1_1HttpConnectionHandlerPool.html#a8ce1d865b1efd7495b5ce55f5d12a3ab">More...</a><br /></td></tr>
<tr class="separator:a8ce1d865b1efd7495b5ce55f5d12a3ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2473cc5157bd6546e9acd0df14c29637"><td class="memItemLeft" align="right" valign="top"><a id="a2473cc5157bd6546e9acd0df14c29637"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandlerPool.html#a2473cc5157bd6546e9acd0df14c29637">~HttpConnectionHandlerPool</a> ()</td></tr>
<tr class="memdesc:a2473cc5157bd6546e9acd0df14c29637"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a2473cc5157bd6546e9acd0df14c29637"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7d15239af996e1989960e9f09409bc2"><td class="memItemLeft" align="right" valign="top"><a id="aa7d15239af996e1989960e9f09409bc2"></a>
<a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html">HttpConnectionHandler</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandlerPool.html#aa7d15239af996e1989960e9f09409bc2">getConnectionHandler</a> ()</td></tr>
<tr class="memdesc:aa7d15239af996e1989960e9f09409bc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a free connection handler, or 0 if not available. <br /></td></tr>
<tr class="separator:aa7d15239af996e1989960e9f09409bc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Pool of http connection handlers. </p>
<p>The size of the pool grows and shrinks on demand. </p>
<p>Example for the required configuration settings: <code></p><pre>
minThreads=4
maxThreads=100
cleanupInterval=60000
readTimeout=60000
;sslKeyFile=ssl/my.key
;sslCertFile=ssl/my.cert
maxRequestSize=16000
maxMultiPartSize=1000000
</pre><p></code> After server start, the size of the thread pool is always 0. Threads are started on demand when requests come in. The cleanup timer reduces the number of idle threads slowly by closing one thread in each interval. But the configured minimum number of threads are kept running. </p>
<p>For SSL support, you need an OpenSSL certificate file and a key file. Both can be created with the command <code></p><pre>
    openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout my.key -out my.cert
</pre><p></code> </p>
<p>Visit <a href="http://slproweb.com/products/Win32OpenSSL.html">http://slproweb.com/products/Win32OpenSSL.html</a> to download the Light version of OpenSSL for Windows. </p>
<p>Please note that a listener with SSL settings can only handle HTTPS protocol. To support both HTTP and HTTPS simultaneously, you need to start two listeners on different ports - one with SLL and one without SSL. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html" title="Alias for QSslConfiguration if OpenSSL is not supported.">HttpConnectionHandler</a> for description of the readTimeout </dd>
<dd>
<a class="el" href="classstefanfrings_1_1HttpRequest.html" title="This object represents a single HTTP request.">HttpRequest</a> for description of config settings maxRequestSize and maxMultiPartSize </dd></dl>

<p class="definition">Definition at line <a class="el" href="httpconnectionhandlerpool_8h_source.html#l00048">48</a> of file <a class="el" href="httpconnectionhandlerpool_8h_source.html">httpconnectionhandlerpool.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a8ce1d865b1efd7495b5ce55f5d12a3ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ce1d865b1efd7495b5ce55f5d12a3ab">&#9670;&nbsp;</a></span>HttpConnectionHandlerPool()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">HttpConnectionHandlerPool::HttpConnectionHandlerPool </td>
          <td>(</td>
          <td class="paramtype">const QSettings *&#160;</td>
          <td class="paramname"><em>settings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classstefanfrings_1_1HttpRequestHandler.html">HttpRequestHandler</a> *&#160;</td>
          <td class="paramname"><em>requestHandler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>Configuration settings for the HTTP server. Must not be 0. </td></tr>
    <tr><td class="paramname">requestHandler</td><td>The handler that will process each received HTTP request. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>The requestMapper gets deleted by the destructor of this pool </dd></dl>

<p class="definition">Definition at line <a class="el" href="httpconnectionhandlerpool_8cpp_source.html#l00012">12</a> of file <a class="el" href="httpconnectionhandlerpool_8cpp_source.html">httpconnectionhandlerpool.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>httpserver/<a class="el" href="httpconnectionhandlerpool_8h_source.html">httpconnectionhandlerpool.h</a></li>
<li>httpserver/<a class="el" href="httpconnectionhandlerpool_8cpp_source.html">httpconnectionhandlerpool.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>stefanfrings</b></li><li class="navelem"><a class="el" href="classstefanfrings_1_1HttpConnectionHandlerPool.html">HttpConnectionHandlerPool</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
